<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="Webamp Modern" />
    <title>Webamp Modern Test Suite</title>
    <style>
      body {
        margin: 0;
        padding: 50px;
        image-rendering: pixelated;
      }
      .hidden {
        display: none !important;
      }
      .i {
        background: fuchsia;
        padding: 0;
      }
      u {
        background: goldenrod;
        display: inline-flex;
        line-height: 1;
        padding: 0;
        pointer-events: all;
      }
      .centered {
        padding: 10px;
        background-color: aquamarine;
      }
      .table {
        display: flex;
        width: 400px;
        margin-top: 20px;
      }
      .col {
        min-width: 25%;
      }
      #drawing {
        padding: 20px;
        border: 1px solid lime;
        background-color: antiquewhite;
        font-size: small;
        user-select: none;
      }
      #drawing > * {
        display: inline-block;
      }
      #grid {
        position: relative;
        background-color: white;
        background-image: linear-gradient(45deg, #d8d8d8 25%, transparent 25%),
          linear-gradient(-45deg, #d8d8d8 25%, transparent 25%),
          linear-gradient(45deg, transparent 75%, #d8d8d8 75%),
          linear-gradient(-45deg, transparent 75%, #d8d8d8 75%);
        background-size: 20px 20px;
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
        width: 150px;
        height: 150px;
        --cell-size: 16px;
      }
      #grid > div {
        width: var(--cell-size);
        height: var(--cell-size);
        line-height: var(--cell-size);
        display: inline-block;
        float: left;
        border: 1px solid #4c4c4c;
        box-sizing: border-box;
        margin-top: -1px;
        margin-left: -1px;
        cursor: pointer;
        z-index: 0;
        position: relative;
        text-align: center;
        vertical-align: middle;
        /* background: white; */
      }
      #grid > div:hover {
        border-color: black;
        z-index: 1;
      }
      #grid > div.black {
        background-color: darkolivegreen;
        border-color: silver;
      }
      #grid > div::before,
      #grid > div:after {
        line-height: 1;
        color: gray;
      }
      #grid > div.x-axis:after {
        position: absolute;
        top: -1em;
        right: -0.5ch;
        content: var(--x-axis);
      }
      #grid > div.y-axis::before {
        position: absolute;
        top: -0.5em;
        left: -1.25ch;
        content: var(--y-axis);
      }
      #grid > div.y-axis-z::after {
        position: absolute;
        bottom: -0.5em;
        left: -1.25ch;
        content: var(--y-axis-z);
      }
      #grid > div.x-0-axis:before {
        position: absolute;
        top: -1em;
        left: -1ch;
        content: var(--0-axis);
      }
      #separator {
        width: 40px;
      }
      #border {
        border: 1px solid blue;
        background: aqua;
        box-sizing: content-box;
        cursor: not-allowed;
      }
      #zoom {
        transform-origin: top left;
        /* margin-left: 40px; */
        /* transform: scale(15); */
        /* transform-origin: bottom left; */
        --foo: "bar";
      }
      #result {
        /* width: 150px; height: 150px; */
        display: block;
      }
      #working {
        float: right;
      }
      #dot,.dot {
        position: absolute !important;
        width: 15px;
        height: 15px;
        top: 0px;
        left: 0px;
        transform: translate3d(-8px, -8px, 0);
        background-color: red;
        border-radius: 50%;
        z-index: 2;
      }
      .col > div {
        max-height: 300px;
        overflow-y: auto;
      }
      .col > div > div {
        border: 1px solid silver;
        padding: 2px;
        cursor: pointer;
      }
      .drop-box {
        min-width: 100px;
        width: auto;
        min-height: 10px;
        background-color: coral;
        border: 5px dashed chocolate;
        padding: 15px;
      }
      .drop-box img, .drop-box canvas {
        float: left;
      }
      .highlight {
        border-color: blueviolet !important;
      }
      #dot2 {
        background-color: blue;
      }
      #result2 {
        position: relative;
      }
      .thumbnail {
        height: 32px;
        margin-left: 10px;
      }
    </style>
  </head>
  <body>
    <div id="drawing">
      <div id="grid">
        <vid id="dot"></vid>
      </div>
      <div id="separator"></div>
      <div id="border">
        <div id="zoom">
          <img id="result" />
        </div>
      </div>
      <canvas id="working" width="10" height="10"></canvas>

      <img class="thumbnail" src="" />
      <img class="thumbnail" src="" />
    </div>

    <div class="table">
      <div id="drop-box" class="drop-box">
        drop a file here

        <img id="drop-preview" src="" style="float:left" />
      </div>
      <div class="drop-box">
        result:
        <div id="result2">

          <div id="cropped">
            <canvas id="tracing" height="10"></canvas>
          </div>
          <vid id="dot2" class="dot"></vid>
        </div>
      </div>
    </div>

    <div class="table hidden">
      <div id="clickable" class="centered">
        click me! +-&gt;
        <u id="app">
          <!-- <img id="img1" src="/assets/skins/webamp/window/main.png"/> -->
          <img
            id="img1"
            src="/assets/extracted/wacup-modern-skin/window/main2.png"
          />
          <!-- <img id="img1" src="/assets/extracted/skins/MMD3/player/Bgoverlay.png"/> -->
          <!-- <img id="img1" src="/assets/extracted/MMD3/component/comp-right-stretch-bg.png"/> -->
          <!-- <img id="img1" src="/assets/extracted/MMD3/player/volume.png" data-width="44" data-height="44"/> -->
          <!-- <img id="img1" src="/assets/skins/webamp/player/videoavs_button_bg.png" /> -->
        </u>
      </div>

      <div class="i">
        <canvas id="canvas"></canvas>
      </div>
    </div>
    <script type="module" src="clip_path.js"></script>

    <div class="table">
      <div class="col">
        Top:
        <div id="top"></div>
      </div>
      <div class="col">
        Right:
        <div id="right"></div>
      </div>
      <div class="col">
        Bottom:
        <div id="bottom"></div>
      </div>
      <div class="col">
        Left:
        <div id="left"></div>
      </div>
      <div class="col">
        Polygon:
        <div id="polygon"></div>
      </div>
    </div>
  </body>
</html>
